package tp1;

import java.net.InetAddress;

public class Groupe {

	InetAddress adresseMulticast;
	String nom;
	int numero;
	int port;
	public static int nbre = 0;
	
	public Groupe(String n, InetAddress a, int port)
	{
		this.nom = n;
		this.adresseMulticast = a;
		this.port = port;
		nbre++;
		this.numero = nbre;
	}
	
	public InetAddress getAdresseMulticast() {
		return adresseMulticast;
	}
	public void setAdresseMulticast(InetAddress adresseMulticast) {
		this.adresseMulticast = adresseMulticast;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public int getNum() {
		return numero;
	}
	public void setNum(int num) {
		this.numero = num;
	}
	public int getPort() {
		return port;
	}
	public void setPort(int port) {
		this.port = port;
	}
	@Override
	public String toString() {
		return "Groupe [adresseMulticast=" + adresseMulticast + ", nom=" + nom
				+ ", num=" + numero + "]";
	}
	
	

}
